package com.zim.access.domain.session;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@TableName(value = "session")
@Accessors(chain = true)
public class SessionDo {
    @TableId
    private String id;

    private String fromId;

    private String fromName;

    private String toId;

    private String toName;

    private String lastMsgId;

    private String lastMsgContent;

    private Long lastMsgTimestamp;

    private Long unReadCut;

    private Long timestamp;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
